Added more messages, cleaned up code