get redirect working and some import cleanup