add comments for all files, fix serveral bugs, some code refactoring, update runnable jar