Made code more dynamic so it works on gitraw and localhost, also updated documentations