Initial Build

Initial build as simple Javascript function: Many TODOs to follow