Remove useless stuff
Add conversion from sQL type