Completely cleaned code