fixing code style inconsistencies and lint errors