[EH] va handling refactored
[BF] fixed mysql query
[BF] template vars refactored (obj2arr)