Add attributes method and some fixes