Math to separate pkg; add namspaces, docs, others