Removed use of Package and BFM. Added validation code.