moved code-behind into front-end file

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