Javascript simplistic framework