Improved some code details