Lastest fixes and cleanup