Made compatible with old code in some degree.
Sill buggy!!!