Fixes

Some bug fixes, TODO implementation, parameters renaming, fix warrning, ...