Cleaned and dumbed down code for demo