Fixed some bug, optimized dependances