First pull request

Pull request into master from where I forked.