Cleaned up unused code
Refactored default handler