Project cleaning and bugfixes