Added Tag class, made some other minor changes