Minor updates and code cleaning