Updated variables, minor bugfixes