Moved coin class to source, added coin struct and compart methods