remove unused database parameter code and relate code. Clear up the code a little bit, especially at the beginning part.