Fix some issues, add in a little bit more functionality