Tidying / Adding JSDoc documentation