General Code Clean up