Format and clean up code

It was hard to read the source code, especially `data_types.rb`, so I did some cleanups, formаtted the code and removed tabs and redundant spaces.