Cleaned up, better conformance to standard proposals.