Added next highest power of two.
cleaned up a bit. consistent syntax.