Latest good version

Update from last version, corrected bugs and syntax