i would suggest keeping coding like this entirely in the project and task files. it will help with troubleshooting any issues (only one place to have to check) and give you more flexibility when it comes to your UI