Added debugging and more settings