Organizes javascript into libraries and application code

Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>