Removed where macro. Updated standard lines. Rewritten tests, but some of them do not pass yet.