cleanup

 * better formatting for debugging messages
 * including headers only when necessary
 * TODOs
 * linting