begin modularising py; minor html and css code cleanup