Even more fixes and cleaning