I recently worked on adding some features to this project and identified a multiple refactor possibilities. For example, export-spaces and 'import-spaces' can be refactored into individual modules and their code can be further refactored into methods.