fixed url error and cleaned up