Updated framework, fixed some issues