move subs down, add comment header

Todo: move to different files instead?