Cleaned up errors and moved trigger value