Made some minor bugfixes and made some fields update more automatically.