Replace BlockPowerContainer java class with scala.  Also replaced unsafe casting operations that should have never been there in the first place.

Potential Fix Issue #37.