a lightweight javascript application structure