Fixes on the code