Initial port of old app into base js format