Big code revision, bug on DataSource fixed