clean up code, redirect links