* lots of bug fixes and changes