Issue 84

cleaning up code in based on comments from @apollo13