Add JSON serialization, reorganize structure, enhance graphics