Fix bugs and improve code