Separated code into individual files

Split code into their own files and created demo and test html files