Simpler code, and added copyright on attribute file