Some GUI improvements, and added comments also.