added serializable interface and cleaned up some comments