updated portability by moving into a single file

moved code-behind into front-end file for maximum portability and
deployment ability