Made a lot of changes - several improvements