Removed redundant code; mistakes