Added more description, cleaned code