Added field class settings for calc fields. Code cleanup.