Many parameters implemented (weights!)

Code had to be altered to make parameter implementation clean. More
object oriented! Fewer arrays!