Refactored some code styles