[Refactor] Removed end_* methods and did coding style