Updated from project repository. Lots of bug fixes.