Small fixes and additional functionality