adding a web interface and starting a little code cleanup