Fixed minor bugs and name conflicts