Fixed some errors and added some attribute methods.