Add tests for dist array construction methods, .gitignore fixes. and PEP8 stuff.