Added arm64 slice, code cleanup, ...

Added arm64 slice, code cleanup, updated for the latest theos version.