124142: Restructured data file, extended functionality, fixed some bugs.