Review, bugfixes and improvements