Add primebot and fix minor bugs