Added profiling options and some commented code for optimising the m
step