Cleaned up code, made web application more dynamic