Finshed core codes; changed bk; still need to clean up&debug