Added a lot to the Handler class and fixed some issues.