Fixed (hopefully) package dependency errors. Also changed to use virtual statements.