Updated version to 1.7.8. Some minor code changes.