Changed message and cleaned up code