Arithmetic module cleanup

-app path unlocked (not working properly due to the lack of finish())
-constant naming is fixed
-encode/decode moved inside Model
-got rid of Vec and closures in the core
-changed asserts to debug-only in the core