Fixed formatting, removed redundant code