Further refactoring to standardise naming conventions and use of docstrings