added comments and author tag in LastState.java, and renamed some variables.
added comments and author tags in Logic.java.
Also removed unused functions.