1) Fixed some small bugs and consistency issues