Clean stuff and fix minor errors