Removed puts and cleaned up