Finish hybrid framework

Need to implement some functions, need to test (See the comments)