Removed boolean and cleaned up code a lil