Kaluza's theory in generalized coordinates