ALMOST PERIODIC HAMILTONIANS: AN ALGEBRAIC APPROACH