v0.9 code rewrite and CSS3 optimisations