MAFA-13: created functionality to handle storing the datetime of the last query. Also made some asthetic changes to the header

Signed-off-by: unknown <cnwnh1@cnwcb5a.cnw.co.nz>