Started and modified from here (http://sirlagz.net/2013/02/08/raspap-webgui/)