Added parameter handling and a helper class to do that. Its pretty nasty so Ill clean it up a bit later. Just wanted to get it working for now.