Added some helper methods, and fixed getElement() to return in byte
order.