cleaned up code, more logical files for parts of code, mainly handler.c