Added feedback and cleaned up code