Added S3 classes and basic plot function