Code optimisations

Deep rewrite of the code so it no longer uses bitmap images.