Cleaned up and added comments. Also fixed focused