Restructures code

Code restructuring, configuration options and plus option for storing
history not inside the observed object.