jsDoc commentary and modularisation.