Added asking functionality
Fixed registering problems and cleaned up code