Cleanup

Pull Request from the cleanup branch.