Use density from file
Small refactoring
Read dimensions from the file
Use more iterations