relocate some code, fix banner location bug