Refactoring done: Renamed variables, cleaned code