removed trailing spaces
fixed missing space between tuple elements
disabled line-too-long for bmdata file since it is converted directly from PHP sources
uppercased more constants
shortened long function names