removal of external class files; consolidation of all logic into main handler