Tweaked the main files a bit more, kept helper functions in fun.h