Completed basic loop features besides matrix vector product
Fixed bugs in function calls