Cleaned up GetParameters

a lot of the functions in GetParameters were only used once, just moved
those to their caller and everyone's happy. though it's still ugly :(