Various changes - added fuctionality