code clean-ups, removed redundant code, simplified code, reformatted code