Added app file

This file will wrap all the library code
Temp file for testing the code on browser
Detect the presence of localStorage global object in the browser
Capsule constructor + wrappers for native routines
Refactored the code using JS Beautify