Fixed issue 7. Found issue 9 which is not urgent. Pull request to master as this code is stable.