Move helper files to lib directory
Remove trailing whitespace