restructuring, many bug fixes, including timezone