Clean up code
Fix some warnings and inaccuracies
Implement simple polyphony