Add more static checking for variables