Code Improvments