Changed the code to work with JME3.0 Stable.