improved comments, corrected compiler errors
added