make headers consistent
more formatting and getting rid of K&R style declarations
start refactoring