Restructures code and documentation, adds proper note off events