#2 Added rests and a bunch of refactoring
See http://stackoverflow.com/q/18136788/21115
#2 Allow rests to be inserted in tune edit page