Fix various issues and add more functionality