Split function finding logic into FindFunctions

- Transferred over trimFunctions test
- Made some of the variable names shorter in the new FindFunctions
- Fixed app.js CLI calling