Some functionality and variables added.