Fixed some issues & cleanup