Separated app js into individual file

Signed-off-by: Brian Kinney <webdevbrian@gmail.com>