Some minor corrections and refactoring to acorn code, unicode still broken