Fixed build bugs, got mining api working.