Split up code into server.js and client.js

- Split up code into server.js (node) and client.js (angular)
- Simplified rules.json