Full thesis available at: http://ria.ua.pt/handle/10773/13141