added SCS matlab back, refactor some basic methods