Cleaned up a bit and did a bit more work