Moved all types into Polar.Types, moved functions into separate modules