Removed unnecessary handler. Cleaned up code a bit.