Reorganised the file layout; put several functions into a separate 'utils.py'