fixed more bugs
cleaned code up a bit
added comments