Fixed various issues and added features