Command line option tuning and copied CSS handling from my closed pull request