Changed coding style and what a couple functions returned if invalid/empty data.
Merge checkin/master