Fixed attr_reader and attr_writer bug and moved to separate module.