Improvements sugested by Alex