Refactored Gates.js -> Gate.js

Also removed usage of 'public' keyword
Moved Gates from a factory to an object