Loading process refactoring. Closes #171