Improve code
Remove old code