Refactor serving and compilation of web files