Functions renamed to avoid mix-ups with S3 classes. Bugfixes.