Commented code, fixed bugs found in beta test

Commented code, made things clearer