Added additional Spark parameters

ok sure, makes sense. the code is a bit confusing though. but no biggie. LGTM