cleaning up code, adding notes and fixing combat bug