Made more extensible (less html in .py files).