Small refactoring
Add prepare function for integer and float fields