Cleaned up some stuff and added some comments and filters