Rewriting Tests to prep for release

- Laid framework for test suite
- Updated javascript regex to allow spaces after "function"