Simplified construction and restructured code.