Clean up code, remove url check