fixed class reference in script and added compilation test
fighting deprecation and unchecked warnings