removed app specific code. still needs clean-up
added ajax to complete button for demo