revamp stuff to work with nginx