Refactored code, added arch ents